﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace QuaManSys.InnerInfo
{
    public partial class InnerMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            //判断用户是否是非法访问
            if (Session["CurUser"] != null)
            {
                //从session中取出当前用户信息并显示
                Tab_Person user = (Tab_Person)Session["CurUser"];
                lblUserName.Text = user.name;
                lblUserDepartment.Text = user.department;
            }
            else
            {
                //跳转到登录页面
                Response.Redirect("~/Login.aspx");
            }
        }
        //注销
        protected void LinkButtonOut_Click(object sender, EventArgs e)
        {
            //清空session中的数据
            Session["CurUser"] = null;
            Response.Redirect("~/Login.aspx");
        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            Response.Redirect("InnerInfoRegist.aspx");
        }

        protected void btnInquiry_Click(object sender, EventArgs e)
        {
            Response.Redirect("InnerInfoQueryList.aspx");
        }

        protected void btnReceive_Click(object sender, EventArgs e)
        {
            Response.Redirect("InnerInfoReminderBox.aspx");
        }
    }
}